﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CustomerRegister : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Reset_Click(object sender, EventArgs e)
    {
        txtCusAdd.Text = "";
        txtCusEmail.Text = "";
        txtCusName.Text = "";
        txtCusPhone.Text = "";
        txtPerson.Text = "";
    }
    protected void Submit_Click(object sender, EventArgs e)
    {
        string cusName = txtCusName.Text.ToString();
        string cusPhone = txtCusPhone.Text.ToString();
        string cusAddress = txtCusAdd.Text.ToString();
        string cusEmail = txtCusEmail.Text.ToString();
        string cusPerson = txtPerson.Text.ToString();
        DCEdu.Customers objCus = new DCEdu.Customers();
        if (objCus.Add(cusName, cusPhone, cusAddress, cusEmail, cusPerson) != -1)
        {
            Utils.MyMessage.ShowMessage("Successful", "Search-Customer.aspx");
        }
        else
            Utils.MyMessage.ShowMessage("Lỗi đăng kí", "CustomerRegister.aspx");
    }
}